package cn.topevery.garden.dal.logic;


import cn.topevery.garden.dal.dao.ManholeReportDao;
import cn.topevery.garden.entity.po.ManholeReport;
import cn.topevery.garden.entity.query.ManholeReportQuery;
import cn.topevery.garden.entity.vo.ManholeReportVO;
import cn.topevery.garden.framework.base.BaseLogic;
import com.github.dozermapper.core.Mapper;
import hw.topevery.framework.db.base.BaseEntityDao;
import hw.topevery.framework.db.entity.DataPager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 井盖信息上报表
 *
 * @author code-generate
 * @date 2021-08-17
 */
@Service
public class ManholeReportLogic extends BaseLogic<ManholeReport> {
    @Autowired
    ManholeReportDao manholeReportDao;

    @Autowired
    private Mapper mapper;

    @Override
    public BaseEntityDao<ManholeReport, Integer> getDao() {
        return manholeReportDao;
    }

    

    /**
     * 获取列表
     *
     * @param query
     */
    public DataPager<ManholeReportVO> listPage(ManholeReportQuery query) {
        return manholeReportDao.listPage(query);
    }

    public void saveOrUpdate(String userId, ManholeReport manholeReport) {
        manholeReportDao.saveOrUpdate(userId, manholeReport);
    }

    public List<ManholeReportVO> getLeanReportListByCode(String code) { return manholeReportDao.getLeanReportListByCode(code); }

}
